Repository navigation
feat(session): fts.session as an Architect extension service - #182
Merged
Merged
Conversation
Inside an Architect app, one extension asks another through the host:
`services.call("fts.session", method, args)`, run as the provider's
action `<PREFIX><METHOD>` as the caller, with the caller's id in the
action's context (`cx.caller`, from the call's principal).
`session::extension::answer` (feature `extension`) is what that action
does, with no Architect crate: JSON in (`Call { doc, request }`), JSON
out (a `Response`), for `cx.caller`'s namespace.
One method per action a request needs (`read`, `write`, `structure`), and
`answer` refuses a request sent through another, so the effect each
method's action declares (read_only, mutating) is what Architect's own
check holds a caller to: a read-only share link's guest extension reads,
and its edits are refused before the provider runs.
`service::action_for`, `READ`/`WRITE`/`STRUCTURE` and the `Sessions`
registry move to `service`, shared by the vox face (`host` re-exports
its old paths) and this one. CI clippy covers `extension` and `vox`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…JSON
A `Response::Timeline` did not survive `facet-json`: its maps are keyed by
`LaneId` and `ItemId`, which it wrote as strings and could not read back
as ids ("expected LaneId, but got String"). Ignition's cue lists, the
first caller to read the timeline through the extension face, hit it.
The id newtypes are now `#[facet(transparent)]`: on every wire (JSON,
vox) an id is the string it wraps, a map key included. New test: a lane
and an item put and read back over JSON, keyed by their ids.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3, the session half: what Keyflow (or any host) needs to serve
fts.sessionto an extension's view inside an Architect app. Stacked on #181.How Architect's extension services work, and where this fits
services.call("fts.session", method, args)(HostRequest::Service).<PREFIX><METHOD>as the caller.runtime-compositor-keyflowpin,f0c04916; not v0.12.6), the action's context carries the caller's id ascx.caller, taken from the call's principal (invocation::caller_json).architect.playheaduses the same field.session::extension::answer(featureextension) is what that action does. It needs no Architect crate:{doc, request}as JSON;Responseas JSON;cx.caller's.Methods, so Architect's own permission holds them
readread_onlyReadData,ReadTimelinewritemutatingstructuremutatinganswerrefuses a request sent through the wrong method. So a share link's guest, whose extensions Architect runsread_only, can call onlyread: its edits are refused by the host's effect check before the provider runs. That's a permission, not a code path.Also
service::action_for,READ/WRITE/STRUCTUREand theSessionsregistry move intoservice. The vox face (host) and this one share them;hostre-exports its old paths.extensionandvox.Tests
tests/session/extension.rs:structure);Checked
In the fleet shell:
The host-side effect check itself is Architect's and is not exercised here. The Keyflow PR will exercise it once its extension registers these actions.
🤖 Generated with Claude Code